package com.xiaoxie.quartz.mapper;

import com.xiaoxie.quartz.domain.JobEntity;
import com.xiaoxie.quartz.domain.dto.GroupDto;
import com.xiaoxie.quartz.domain.dto.JobDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface JobMapper {
    List<GroupDto> getAllGroups();

    List<JobDto> getJobsByGroup(String jobGroup);

    List<JobEntity> getJobList(@Param("job") JobEntity jobEntity, @Param("triggerStatusList") List<String> triggerStatusList);

    int countByJobGroupAndJobName(@Param("jobGroup") String jobGroup, @Param("jobName") String jobName);

    JobEntity getJobByGroupNameAndJobName(@Param("jobGroup") String jobGroup, @Param("jobName") String jobName);
}
